using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Commonplace
{
    public partial class ActionResultForm : Form
    {
        public enum ActionResult
        {
            No,
            Yes,
            OneByOne
        }

        List<string> _listData;
        ActionResult _result = ActionResult.No;

        public ActionResult Result
        {
            get { return _result; }
        }


        public string Message
        {
            get { return _message.Text; }
            set { _message.Text = value; }
        }

        public List<string> List
        {
            get { return _listData; }
            set
            {
                _listData = value;
                _list.Items.Clear();
                foreach (string item in value)
                    _list.Items.Add(item);
            }
        }



        public ActionResultForm()
        {
            InitializeComponent();
        }

        private void _noAll_Click(object sender, EventArgs e)
        {
            _result = ActionResult.No;
            Close();
        }

        private void _yesAll_Click(object sender, EventArgs e)
        {
            _result = ActionResult.Yes;
            Close();
        }

        private void _oneByOne_Click(object sender, EventArgs e)
        {
            _result = ActionResult.OneByOne;
            Close();
        }
    }
}